// filter evil xss code
export default function dexss(unsafe) {
    if (!unsafe) return '';

    let result = unsafe.replace(/<img \s*([^>]*)src=("[^\">]*")\s*([^>]*)>/g, '<img src=$2>');
    result = result.replace(/<img \s*([^>]*)src=('[^\'>]*')\s*([^>]*)>/g, '<img src=$2>');
    result = result.replace(/<img \s*([^>]*)src=([^\'\"> ]*)\s*([^>]*)>/g, '<img src=$2>');
    
    return result;
}
